how to count bars